import fetch from 'utils/fetch'

/*
  战术板CURD
*/
export default {
  delete (data, options) {
    return fetch({
      url: '/train/tactic?tacticId=' + data.tacticId,
      method: 'DELETE',
      data,
      options
    })
  },
  save (data, options) {
    return fetch({
      url: '/train/tactic',
      method: 'POST',
      data: JSON.stringify(data),
      options
    })
  },
  update (data, options) {
    return fetch({
      url: '/train/tactic',
      method: 'PUT',
      data: JSON.stringify(data),
      options
    })
  },
  details (params) {
    return fetch({
      url: '/train/tactic/info',
      params
    })
  },
  // 战术板类型
  typeList (params) {
    return fetch({
      url: '/train/tactic/list/type',
      params
    })
  },
  // 战术板名称列表
  typeNameList (params) {
    return fetch({
      url: '/train/tactic/list/type/name',
      params
    })
  },
  // 运动类型
  sportTypeList (params) {
    return fetch({
      url: '/train/tactic/list/type/sport',
      params
    })
  }
}
